package br.com.firula.dao;

import java.util.Date;
import java.util.List;

import br.com.firula.web.filter.Filtro;

public interface GenericDAO extends DAO{
	public <T> List<T> findAll(Class<T> entityClass);
	public <T> Integer countAll(Class<T> entityClass);
	public <T> T findById(Class<T> entityClass, Long id);
	public <T> List findByExample(final T example, final int first, final int max);
	public <T> List findByExample(final T example[], Date inicio, Date fim, final int first, final int max, String order);
	public <T> List findByExample(final T example);
	public List findByFilter(final Filtro filter);
    public <T> int countByExample(final T example);
    public <T> int countByExample(final T example[],Date inicio, Date fim);
    public int countByFilter(Filtro filter);
	public <T> void saveOrUpdate(T entity);
	public <T> void update (T entity);
	public <T> void remove(T entity);
	public String getOrdemPadrao();
	public boolean isFiltraAtivos();
	public void setFiltraAtivos(boolean b);
}
